﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WXDba.Entity;

namespace WXDba.Abstract
{
    /// <summary>
    /// 消息记录接口，分装
    /// </summary>
    public interface IMsgRecord : IBaseAbstract<MsgRecord>
    {
        #region 扩展接口
        /// <summary>
        /// 判断接收消息的MsgID的记录是否已经存在
        /// </summary>
        /// <param name="MsgID">接收消息ID</param>
        /// <returns></returns>
        bool Exists(long MsgID);
        #endregion

        #region 获取列表
        /// <summary>
        /// 获取交互分页消息记录
        /// </summary>
        /// <param name="info">分页信息</param>
        /// <param name="ToUserName">消息接收者</param>
        /// <param name="FromUserName">消息发送者</param>
        /// <param name="MsgType">消息类型</param>
        /// <returns></returns>
        List<MsgRecord> GetPage(PageInfo info, string ToUserName, string FromUserName, string MsgType = null);
        #endregion

        #region 获取数量
        /// <summary>
        /// 获取消息记录总数
        /// </summary>
        /// <returns></returns>
        int GetCount();
        #endregion
    }
}
